<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="header.jsp" %>

<div class="content_wrap">
<section id="content">
<ul>
    <li class="hentry contain">	
	<h2>Hi, ${sessionuser.player.firstname}!</h2>
	<c:if test="${not empty userbets}">

    	<p>Your current bets</p>
		<table>
		<tr><th id="borderedBg">Event</th><th id="borderedBg">Betted on</th><th id="borderedBg">Amount</th><th id="borderedBg">Time of your bet</th><th id="borderedBg">Decisiontime</th><th id="borderedBg">Current odds</th><th id="borderedBg">If you win</th></tr>
			<c:forEach var="bet" items="${userbets}" varStatus="myIndex">
				<tr>
					<td id="bordered">${bet.event.name}</td>
					<td id="bordered">${bet.option.name}</td>
					<td id="bordered">${bet.amount}</td>
					<td id="bordered">${bet.formattedTimeOfBet}</td>
					<td id="bordered">${bet.event.readerFriendlyBetDeadline}</td>
					<td id="bordered">${oddsforuserbets.get(myIndex.index)}</td>
					<td id="bordered">${oddsforuserbets.get(myIndex.index) * bet.amount}</td>
			</c:forEach>
		</table>

	</c:if>
	</li>
</ul>	
</section>
</div>


<%@ include file="footer.jsp" %>